<? if(!defined('IN_TIPASK')) exit('Access Denied'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><? $user=$this->user; $setting=$this->setting; ?><html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Tipask's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=TIPASK_CHARSET?>">
<link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet"/>
</head>
<body>
<script type="text/javascript">
g_site_url='<?=SITE_URL?>';g_prefix='<?=$setting['seo_prefix']?>';g_suffix='<?=$setting['seo_suffix']?>'; g_user=null;
</script>
<script src="<?=SITE_URL?>js/jquery.js" type="text/javascript"></script>
<script src="<?=SITE_URL?>js/dialog.js" type="text/javascript"></script>
<script src="<?=SITE_URL?>js/admin.js" type="text/javascript"></script>
<div id="append">
</div>
<div class="container"><? if(isset($message)) { $type=isset($type)?$type:'correctmsg';  ?><div class="<?=$type?>"><p><?=$message?></p></div><? } ?><h3>调用列表 <a href="index.php?admin_datacall/add<?=$setting['seo_suffix']?>" class="sgbtn">添加调用</a> </h3>
<div class="mainbox">
<form onsubmit="return confirm('该操作不可恢复，您确认要删除这些调用吗？');"  action="index.php?admin_datacall/remove<?=$setting['seo_suffix']?>"  method=post>
<table class="datalist fixwidth">
<tr>
<th><input class="checkbox" id="chkall" onclick="checkall('delete[]')" type="checkbox" name="chkall"><label for="chkall">删除</label></th>
<th>调用名称</th>
<th>添加时间</th>
<th>编辑</th>
<th>调用代码</th>
</tr>
<? if(is_array($datacalllist)) { foreach($datacalllist as $datacall) { ?>
<tr>
<td width="20" class="option"><input class="checkbox" type="checkbox" value="<?=$datacall['id']?>" name="delete[]"></td>
<td width="300"><strong><?=$datacall['title']?></strong></td>
<td width="200"><?=$datacall['time_format']?></td>
<td><a href="index.php?admin_datacall/edit/<?=$datacall['id']?><?=$setting['seo_suffix']?>">编辑</a></td>
<td><a href="javascript:jscode(<?=$datacall['id']?>)">获取代码</a></td>
</tr>
<? } } ?>
</table>

</div>
<div class="opt"><input type="submit" name="submit" value=" 提 交 " tabindex="3" class="btn"></div>
</form>
</div>
<script type="text/javascript">
function jscode(id){
$.dialog({
    id:'jscodeDiv',
    position:'center',
    align:'left',
    fixed:1,
    width:680,
    height:100,
    title:'获取js调用代码',
    fnCancel:function(){$.dialog.close('jscodeDiv')},
    content:'JS调用 (复制代码到您网站文件中的相应位置)<textarea rows="2" style="width: 95%;" onfocus="this.select()">&lt;script type="text/javascript" src="<?=SITE_URL?>index.php?js/view/'+id+'<?=$setting['seo_suffix']?>" &gt;&lt;/script&gt;</textarea>'
  });
}
</script>

</body>

</html>
